<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
	<meta name="description" content="" />
	<meta name="keywords" content="" />
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
	<meta name="format-detection" content="telephone=no" />
	<title>版本管理</title>
	<link rel="shortcut icon" href="/images/favicon.ico" />
	<!--嵌套css-->
	<script type="text/javascript" src="/js/i18next.min.js"></script>
	<script type="text/javascript" src="/me/app.js"></script>
	<link type="text/css" rel="stylesheet" href="/dashboard/css/bootstrap.min.css" />
	<link type="text/css" rel="stylesheet" href="/dashboard/css/AdminLTE.min.css" />
	<link type="text/css" rel="stylesheet" href="/dashboard/css/skins/_all-skins.min.css" />
	<link type="text/css" rel="stylesheet" href="/dashboard/css/font-awesome.min.css" />
	<link type="text/css" rel="stylesheet" href="/dashboard/css/daterangepicker-bs3.css" />
	<link type="text/css" rel="stylesheet" href="/css/weui.min.css" />
	<link rel="stylesheet" type="text/css" href="/dashboard/css/versions.css">
</head>

<body class="skin-blue sidebar-mini sidebar-collapse">
	<div id="wrapper"></div>

	<!--嵌套js-->
	<script type="text/javascript" src="/dashboard/js/moment.min.js"></script>
	<script type="text/javascript" src="/dashboard/js/jQuery-2.1.4.min.js"></script>
	<script type="text/javascript" src="/dashboard/js/underscore.min.js"></script>
	<script type="text/javascript" src="/dashboard/js/backbone.min.js"></script>
	<script type="text/javascript" src="/dashboard/js/react.js"></script>
	<script type="text/javascript" src="/dashboard/js/react-dom.min.js"></script>
	<script type="text/javascript" src="/dashboard/js/bootstrap.min.js"></script>
	<script type="text/javascript" src="/dashboard/js/jquery.slimscroll.min.js"></script>
	<script type="text/javascript" src="/dashboard/js/daterangepicker.js"></script>
	<script type="text/javascript" src="/dashboard/js/moment.min.js"></script>
	<script type="text/javascript" src="/dashboard/js/app.min.js"></script>
	<script type="text/javascript" src="/dashboard/js/wrapper.js"></script>
	<script type="text/javascript" src="/dashboard/js/router.js"></script>

	<script type="text/javascript" src="/dashboard/js/src/uploadAvatar.js"></script>
	<script type="text/javascript" src="/dashboard/js/versions.js"></script>
	<script>
		var AppMain = ReactDOM.render(React.createElement(parllayComponents.Wrapper, {
			contentData: function (content, appId) {
				if (appId) {
					$.ajax({
						type: 'get',
						url: '/me/walls',
						dataType: 'json',
						success: function (data) {
							if (data) {
								content.setState({
									contentData: data
								});

								data.forEach(function (i) {
									var clipboard = new Clipboard('#clipboard' + i.id);

									clipboard.on('success', function (e) {
										$('#clipboard' + i.id + ' .tooltip-inner').text('复制成功 !')
										e.clearSelection();
									})
								})
							}
						}
					})
				}
			},
			getSideBar: function (sidebar) {
				data = [
					{ "url": "/console", "name": "<%- t('console.home.prompt4')%>", "icon": " fa-list-ul" },
					// {"url":"/organization","name":"<%- t('console.home.prompt5')%>","icon":" fa-sitemap"},
					// {"url":"/screen","name":"<%- t('console.home.prompt6')%>","icon":"  fa-desktop"}
				];
				setTimeout(function () {
					sidebar.setState({
						data: data
					})
				}, 0)
			},
			getSocialAccount: function () {
				refreshOfficialAccount()
			},
			getUserInfo: function (app) {
				setTimeout(function () {
					app.setState({
						userAccount: {
							name: '<%= user.name %>',
							src: '<%= user.profile_image %>', //TODO: We should change the src to profile_image
							ref: '<%= user.from %>',
							hash_id: '<%= user.hash_id %>',
							date: '2016年4月11日',
							used: '0G',
							total: '10G',
							hasUserAccount: true
						}
					})
				})
			}
		}), document.getElementById('wrapper'))
	</script>
</body>

</html>